/**
 * Lukasz Muziol
 *
 * MEng Individual Project
 * Gride: A teaching oriented Groovy IDE  *
 *
 */

package gride.events;

/**
 * This class contains constant values used to identify events in the event
 * manager.
 *
 * @author Lukasz Muziol
 */
public class GrideEvents
{
    /**
     * Event raised before closing the program
     */
    public static final String EXITING_GRIDE = "ExitingGride";

    /**
     * Event raised before closing an active project
     */
    public static final String CLOSING_PROJECT = "ClosingProject";
        
    /**
     * Event raised after closing an active project
     */
    public static final String PROJECT_CLOSED = "ProjectClosed";

    /**
     * Event raised after adding a new script to the project
     *
     * args: { GrideScript script }
     */
    public static final String PROJECT_NEW_SCRIPT = "ProjectNewScript";

    /**
     * Event raised after importing an existing file to the project
     *
     * args: { "script|library", GrideScript|GrideLibrary file }
     */
    public static final String PROJECT_FILE_IMPORTED = "ProjectFileAdded";

    /**
     * Event raised to request exclude file
     *
     * args: { "script|library", GrideScript|GrideLibrary file }
     */
    public static final String PROJECT_EXCLUDE_FILE = "ProjectExcludeFile";

    /**
     * Event raised before excluding file
     *
     * args: { "script|library", GrideScript|GrideLibrary file }
     */
    public static final String PROJECT_EXCLUDING_FILE = "ProjectExcludingFile";

    /**
     * Event raised after excluding file
     *
     * args: { "script|library", GrideScript|GrideLibrary file }
     */
    public static final String PROJECT_FILE_EXCLUDED = "ProjectScriptExcluded";

    /**
     * Event raised after renaming/moving file
     *
     * args: { GrideScript script }
     */
    public static final String PROJECT_FILE_RENAMED = "ProjectFileRenamed";

    /**
     * Event raised after creating a new project or loading an existing one
     */
    public static final String PROJECT_LOADED = "ProjectLoaded";

    /**
     * Event raised to request that the file is opened in the editor
     *
     * args: { GrideScript file }
     */
    public static final String OPEN_FILE = "OpenFile";

    /**
     * Event raised to request that the file is closed in the editor
     *
     * args: { GrideScript file }
     */
    public static final String CLOSE_FILE = "CloseFile";

    /**
     * Event raised before closing file in the editor
     *
     * args: { GrideScript file }
     */
    public static final String CLOSING_FILE = "ClosingFile";

    /**
     * Event raised after activating a file (opening its tab in the editor)
     *
     * args: { GrideScript file }
     */
    public static final String ACTIVE_FILE_CHANGED = "ActiveFileChanged";

    /**
     * Event raised before executing a file
     *
     * args: { GrideScript file }
     */
    public static final String EXECUTING_FILE = "ExecutingFile";

    /**
     * Event raised when an exception terminates the execution of a script
     *
     * args: { Exception exception }
     */
    public static final String EXECUTION_EXCEPTION = "ExecutionException";

    /**
     * Event raised when an error occurs during compilation using groovyc
     *
     * args: { String groovyc's_stderr_output }
     */
    public static final String COMPILATION_ERROR = "CompilationError";

    /**
     * Event raised to request that the given file is open for editing at
     * the given line and the line is highlighted with the given color
     *
     * args: { GrideScript file, int lineNumber, Color color }
     */
    public static final String HIGHLIGHT_FILE_LINE = "HighlightFileLine";

    /**
     * Event raised after changing the main script in the current project
     *
     * args: { GrideScript main }
     */
    public static final String MAIN_SCRIPT_CHANGED = "MainScriptChanged";

    /**
     * Event raised to request saving all files modified in the editor
     */
    public static final String SAVE_ALL_FILES = "SaveAllFiles";
        
}
